package com.zhangtai.modules.entity.salary;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zhangtai.config.LongJsonDeserializer;
import com.zhangtai.config.LongJsonSerializer;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;


/**
 * 薪资组分配
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-09-21 17:34:24
 */
@Data
@TableName("tb_salary_distribution")
public class SalaryDistributionEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 薪资组分配id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long id;
    /**
     * 发薪单位id
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long payrollUnitId;

    /**
     * 旧发薪单位id
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long oidPayrollUnitId;
    /**
     * 员工id
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long oid;
//			/**
//		 * 公司id
//		 */
//			@JsonDeserialize(using = LongJsonDeserializer.class)
//			@JsonSerialize(using = LongJsonSerializer.class)
//			private Long orgId;

    /**
     * 公司id
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long unitId;
    /**
     * 旧薪资组id
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long oidSalaryGroupId;
    /**
     * 薪资组id
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long salaryGroupId;
    /**
     * 薪资组分配情况，0:未分配，1：已分配
     */
    private Integer isDistribute;
    /**
     * 分配人
     */
    private String distributionName;
    /**
     * 分配人code
     */
    private String distributionCode;
    /**
     * 备注
     */
    private String remark;
    /**
     * 0:正常。1：删除
     */
    private Integer isDelete;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 变动类型   0专业晋级/1管理晋级/2试用转正/3入职定薪/4降级调薪/5薪资调整
     */
    private Integer type;


    //分配日期
    @JsonFormat(pattern = "YYYY-MM-dd")
    private Date distributionTime;

    /**
     * 节税 0 否 1是
     */
    private Integer isTax;


}
